import { createRouter, createWebHashHistory } from "vue-router";
import Welcome from "../components/Welcome.vue"

const routes = [
  {
    path: "/",
    name: "home",
    component: Welcome,
    redirect:"/xia",
    meta:{
      title:"首页"
    },
    children: [
        {
          path: "/xitong",
          name: "系统管理",
          component: () => import("../view/xitongguanli/index.vue"),
          children:[
            {
              path:"/xitong/userManage",
              name:"用户管理1",
              component: () => import("../view/userManage/userManage.vue"),
            },        
            {
              path: "/xitong/caidan",
              name: "菜单管理",
              component: () => import("../view/xitongguanli/caidan.vue"),
            }
          ]
        },
        {
            path: "/xia",
            name: "xia",
            component: () => import("../components/HelloWorld.vue"),
        },
        {
          path: "/roleManage",
          name: "角色管理",
          component: () => import("../view/roleManage/roleManage.vue"),
        },
        {
          path: "/permission",
          name: "权限管理",
          component: () => import("../view/quanxianManage/quanxianManage.vue"),
        },
        {
            path: "/neirong",
            name: "xiajihua",
            component: () => import("../components/List.vue"),
        },
        {
          path: "/hfluru",
          name: "绗缝录入",
          component: () => import("../components/hfluru.vue"),
        },
        {
          path: "/lailiao",
          name: "来料录入",
          component: () => import("../components/lailiao.vue"),
        },
        {
          path: "/cailiao",
          name: "材料管理",
          component: () => import("../view/cailiaoguanli/Cailiaoguanli.vue"),
        },
        {
          path: "/yuancai",
          name: "原材料管理",
          component: () => import("../view/cailiaoguanli/Yuancaiguanli.vue"),
        },
        {
          path: "/zhenpi",
          name: "真皮管理",
          component: () => import("../view/zhenpi/zhenpi.vue"),
        },
        {
          path: "/zhenpiOrder",
          name: "生产订单",
          component: () => import("../view/zhenpi/zhenpiOrder.vue"),
        }
    ],
  },

];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});


export default router;
